Remove redundant assignments to page, which may cause NULL dereferences.
authorMatthias Clasen <mclasen@redhat.com>
Sun, 2 Jul 2006 15:12:40 +0000 (15:12 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sun, 2 Jul 2006 15:12:40 +0000 (15:12 +0000)
2006-06-30  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtknotebook.c (gtk_notebook_tab_space): Remove
        redundant assignments to page, which may cause NULL
        dereferences.  (#346334, Dave Vasilevsky)

ChangeLog
ChangeLog.pre-2-10
gtk/gtknotebook.c

index f8cd7f7455f16e111c8194301a6637db7269b754..828ad77fa6cbdf72ca5e258c51695450aad4e2a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2006-06-30  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtknotebook.c (gtk_notebook_tab_space): Remove
+       redundant assignments to page, which may cause NULL
+       dereferences.  (#346334, Dave Vasilevsky)
+
        * demos/gtk-demo/editable_cells.c: Portability fix.
        (#346375, Thomas Klausner)
 
index f8cd7f7455f16e111c8194301a6637db7269b754..828ad77fa6cbdf72ca5e258c51695450aad4e2a1 100644 (file)
@@ -1,5 +1,9 @@
 2006-06-30  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtknotebook.c (gtk_notebook_tab_space): Remove
+       redundant assignments to page, which may cause NULL
+       dereferences.  (#346334, Dave Vasilevsky)
+
        * demos/gtk-demo/editable_cells.c: Portability fix.
        (#346375, Thomas Klausner)
 
index a846aa29dbd9629a9b9220d60fdf45e119b7c5f2..c032a89238ac02bbe79681003e6a1ed86bc179ab 100644 (file)
@@ -4683,7 +4683,6 @@ gtk_notebook_tab_space (GtkNotebook *notebook,
 {
   GtkNotebookPrivate *priv;
   GtkWidget *widget;
-  GtkNotebookPage *page;
   GList *children;
   gint tab_pos = get_effective_tab_pos (notebook);
   gint tab_overlap;
@@ -4710,6 +4709,8 @@ gtk_notebook_tab_space (GtkNotebook *notebook,
 
       while (children)
        {
+          GtkNotebookPage *page;
+
          page = children->data;
          children = children->next;
 
@@ -4725,6 +4726,8 @@ gtk_notebook_tab_space (GtkNotebook *notebook,
 
       while (children)
        {
+          GtkNotebookPage *page;
+
          page = children->data;
          children = children->next;
 
@@ -4748,7 +4751,6 @@ gtk_notebook_tab_space (GtkNotebook *notebook,
          if (*tab_space > *max - *min - tab_overlap)
            {
              *show_arrows = TRUE;
-             page = notebook->focus_tab->data;
 
              /* take arrows into account */
              *tab_space = widget->allocation.width - tab_overlap -
@@ -4784,7 +4786,6 @@ gtk_notebook_tab_space (GtkNotebook *notebook,
          if (*tab_space > *max - *min - tab_overlap)
            {
              *show_arrows = TRUE;
-             page = notebook->focus_tab->data;
 
              /* take arrows into account */
              *tab_space = widget->allocation.height -